<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    p::before {
      content: "begin: ";
      color: cadetblue;
    }
    p::after {
      color: chocolate;
      content: " :end";
    }
  </style>
</head>
<body>
  <p>这是一个 p 标签</p>
</body>
</html>